package com.yizhi.student.service.impl;

import com.yizhi.student.dao.StudentInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.yizhi.student.domain.StudentInfoDO;
import com.yizhi.student.service.StudentInfoService;


@Service
public class StudentInfoServiceImpl implements StudentInfoService {


  @Autowired
  private StudentInfoDao studentInfoDao;

  @Override
  public StudentInfoDO get(Integer id) {
    System.out.println("======service层中传递过来的id参数是：" + id + "======");
    return studentInfoDao.selectByPrimaryKey(id);
  }


  @Override
  public List<StudentInfoDO> list(Map<String, Object> map) {
    return studentInfoDao.listAll(map);
  }

  //"===================================================================================="


  @Override
  public int count(Map<String, Object> map) {
    return studentInfoDao.count(map);
  }

  @Override
  public int save(StudentInfoDO studentInfo) {
    return studentInfoDao.insert(studentInfo);
  }

  @Override
  public int update(StudentInfoDO studentInfo) {
    return studentInfoDao.updateByPrimaryKey(studentInfo);
  }

  @Override
  public int remove(Integer id) {
    return studentInfoDao.deleteByPrimaryKey(id);
  }

  @Override
  public int batchRemove(Integer[] ids) {
    return studentInfoDao.batchRemove(ids);
  }

}
